Optimal. Leaf size=163 \[ \frac{c^3 2^{\frac{5}{2}-\frac{p}{2}} (3 A-B (2-p)) (1-\sin (e+f x))^{\frac{p+1}{2}} (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1} \, _2F_1\left (\frac{p-3}{2},\frac{p+1}{2};\frac{p+3}{2};\frac{1}{2} (\sin (e+f x)+1)\right )}{3 f g (p+1)}-\frac{B (c-c \sin (e+f x))^{2-p} (g \cos (e+f x))^{p+1}}{3 f g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.275605, antiderivative size = 163, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2860, 2689, 70, 69} \[ \frac{c^3 2^{\frac{5}{2}-\frac{p}{2}} (3 A-B (2-p)) (1-\sin (e+f x))^{\frac{p+1}{2}} (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1} \, _2F_1\left (\frac{p-3}{2},\frac{p+1}{2};\frac{p+3}{2};\frac{1}{2} (\sin (e+f x)+1)\right )}{3 f g (p+1)}-\frac{B (c-c \sin (e+f x))^{2-p} (g \cos (e+f x))^{p+1}}{3 f g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2860
Rule 2689
Rule 70
Rule 69
Rubi steps
\begin{align*} \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{2-p} \, dx &=-\frac{B (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{2-p}}{3 f g}-\frac{1}{3} (-3 A+B (2-p)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{2-p} \, dx\\ &=-\frac{B (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{2-p}}{3 f g}-\frac{\left (c^2 (-3 A+B (2-p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{\frac{1}{2} (-1-p)} (c+c \sin (e+f x))^{\frac{1}{2} (-1-p)}\right ) \operatorname{Subst}\left (\int (c-c x)^{2+\frac{1}{2} (-1+p)-p} (c+c x)^{\frac{1}{2} (-1+p)} \, dx,x,\sin (e+f x)\right )}{3 f g}\\ &=-\frac{B (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{2-p}}{3 f g}-\frac{\left (2^{\frac{3}{2}-\frac{p}{2}} c^4 (-3 A+B (2-p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-\frac{1}{2}+\frac{1}{2} (-1-p)-\frac{p}{2}} \left (\frac{c-c \sin (e+f x)}{c}\right )^{\frac{1}{2}+\frac{p}{2}} (c+c \sin (e+f x))^{\frac{1}{2} (-1-p)}\right ) \operatorname{Subst}\left (\int \left (\frac{1}{2}-\frac{x}{2}\right )^{2+\frac{1}{2} (-1+p)-p} (c+c x)^{\frac{1}{2} (-1+p)} \, dx,x,\sin (e+f x)\right )}{3 f g}\\ &=\frac{2^{\frac{5}{2}-\frac{p}{2}} c^3 (3 A-B (2-p)) (g \cos (e+f x))^{1+p} \, _2F_1\left (\frac{1}{2} (-3+p),\frac{1+p}{2};\frac{3+p}{2};\frac{1}{2} (1+\sin (e+f x))\right ) (1-\sin (e+f x))^{\frac{1+p}{2}} (c-c \sin (e+f x))^{-1-p}}{3 f g (1+p)}-\frac{B (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{2-p}}{3 f g}\\ \end{align*}
Mathematica [A] time = 0.870102, size = 155, normalized size = 0.95 \[ -\frac{c^2 2^{\frac{1}{2} (-p-1)} \cos (e+f x) (c-c \sin (e+f x))^{-p} (g \cos (e+f x))^p \left (8 (3 A+B (p-2)) (1-\sin (e+f x))^{\frac{p+1}{2}} \, _2F_1\left (\frac{p-3}{2},\frac{p+1}{2};\frac{p+3}{2};\frac{1}{2} (\sin (e+f x)+1)\right )+B 2^{\frac{p+1}{2}} (p+1) (\sin (e+f x)-1)^3\right )}{3 f (p+1) (\sin (e+f x)-1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.515, size = 0, normalized size = 0. \begin{align*} \int \left ( g\cos \left ( fx+e \right ) \right ) ^{p} \left ( A+B\sin \left ( fx+e \right ) \right ) \left ( c-c\sin \left ( fx+e \right ) \right ) ^{2-p}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p}{\left (-c \sin \left (f x + e\right ) + c\right )}^{-p + 2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p}{\left (-c \sin \left (f x + e\right ) + c\right )}^{-p + 2}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]